package com.niit.entity;

import java.util.Date;

public class Books {
//    封装一个类的步骤：
//    1.把所有属性命名然后添加私有修饰符
    private Integer bookId;
    private String title;
    private String author;
    private String publisher;
    private Date publish_time;
    private Date create_time;

//2.创建构造函数，快捷键：alt+insert
    public Books() {
    }
    public Books(Integer bookId, String title, String author, String publisher, Date publish_time, Date create_time) {
        this.bookId = bookId;
        this.title = title;
        this.author = author;
        this.publisher = publisher;
        this.publish_time = publish_time;
        this.create_time = create_time;
    }
//    3.创建getter和setter方法

    public Integer getBookId() {
        return bookId;
    }

    public void setBookId(Integer bookId) {
        this.bookId = bookId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public Date getPublish_time() {
        return publish_time;
    }

    public void setPublish_time(Date publish_time) {
        this.publish_time = publish_time;
    }

    public Date getCreate_time() {
        return create_time;
    }

    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }
//    4.生成toString()方法

    @Override
    public String toString() {
        return "Books{" +
                "bookId=" + bookId +
                ", title='" + title + '\'' +
                ", author='" + author + '\'' +
                ", publisher='" + publisher + '\'' +
                ", publish_time=" + publish_time +
                ", create_time=" + create_time +
                '}';
    }
}
